<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">
    <div class="">
        <div data-interval="3000" id="carousel1" class="carousel slide">
            <ol th:if="!${#lists.isEmpty(advertList)} and ${#lists.size(advertList)>1}" class="carousel-indicators">
                <li th:each="advert, index : ${advertList}"  th:attr="data-slide-to=${index['index']}" data-target="#carousel1" th:class="${index['index']==0}?'active'"></li>
            </ol>
            <div class="carousel-inner">
                <div th:if="!${#lists.isEmpty(advertList)} and ${#lists.size(advertList)>0}" th:each="advert, index : ${advertList}" class="item" th:classappend="${index['index']==0}?'active'">
                    <a th:if="${advert['redirectType']}!=1 and  ${advert['redirectType']}!=3" th:href="(${advert['redirectType']}==4?@{/web/course/liveInfo?courseId={courseId}(courseId=${advert['courseId']})}:(${advert['redirectType']}==0 ? 'javascript:void(0)' : @{/web/course/courseInfo?courseId={courseId}(courseId=${advert['courseId']})}))" th:target="${advert['newPage']==2}?'_blank'">
                        <img alt="image" class="img-responsive" th:src="${advert['imageMap']['url']}">
                    </a>
                    <a class="openBanner" th:if="${advert['redirectType']}==1 or ${advert['redirectType']}==3" th:attrappend="data-soure=${advert['pageUrl']},data-jump=${advert['newPage']}">
                        <img alt="image" class="img-responsive" th:src="${advert['imageMap']['url']}">
                    </a>
                </div>
            </div>
            <a th:if="!${#lists.isEmpty(advertList)} and ${#lists.size(advertList)>1}" data-slide="prev" href="#carousel1" class="left carousel-control">
                <span class="icon-prev"><i class="fa fa-chevron-left"></i></span>
            </a>
            <a th:if="!${#lists.isEmpty(advertList)} and ${#lists.size(advertList)>1}" data-slide="next" href="#carousel1" class="right carousel-control">
                <span class="icon-next"><i class="fa fa-chevron-right"></i></span>
            </a>
        </div>
    </div>
</html>